/**
 * @USER: Administrator
 * @DATE: 2024/9/20 下午7:10
 * @VERSION: 1.0.0
 */
public class LC1662 {
    public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for (String s : word1) {
            s1.append(s);
        }
        for (String s : word2) {
            s2.append(s);
        }
        return s1.compareTo(s2) == 0;
    }
}
